<template>
	<view class="item-operation unify-flex" :class="{'unify-absolute': absolute}" :style="{'bottom': bottom, 'right': right}">
		<view class="iconfont el-icon-jianshao" :class="'tf-' + themeColor.name"
			v-if="data.number> 0" @tap="$emit('minus', $event, 1, index3, index2, data)"></view>
		<view class="item-number" v-if="data.number > 0">
			{{data.number}}
		</view>
		<view class="iconfont el-icon-zengjia" :class="'tf-' + themeColor.name" @tap="$emit('add', $event, 2, index3, index2,data)">
		</view>
	</view>
</template>

<script>
	export default {
		props: {
				
			// carNumber:{
			// 	type: Number,
			// 	default: 0
			// },
			data: {
				type: Object,
				default: undefined
			},
			absolute: {
				type: Boolean,
				default: false
			},
			index: {
				type: Number,
				default: 0
			},
			index2: {
				type: Number,
				default: 0
			},
			bottom: {
				type: String,
				default: ''
			},
			right: {
				type: String,
				default: ''
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item-operation {
		width: max-content;
		align-items: center;
	
		.item-number {
			width: 50rpx;
			text-align: center;
			font-size: $uni-font-size-base;
		}
	
		.iconfont {
			font-size: 40rpx;
		}
	}
</style>
